#include "imu_reader.h"
uint16_t IMU_DecodeIMUData_Acce(uint8_t chrTemp[],float acce[]){
    acce[0] = (chrTemp[3]<<8|chrTemp[2])/32768.0*16;
    acce[1] = (chrTemp[5]<<8|chrTemp[4])/32768.0*16;
    acce[2] = (chrTemp[7]<<8|chrTemp[6])/32768.0*16; 
    return __IMU_TEMP;
}
uint16_t IMU_DecodeIMUData_Omga(uint8_t chrTemp[],float omga[]){
    omga[0] = (chrTemp[3]<<8|chrTemp[2])/32768.0*2000;
    omga[1] = (chrTemp[5]<<8|chrTemp[4])/32768.0*2000;
    omga[2] = (chrTemp[7]<<8|chrTemp[6])/32768.0*2000; 
    return __IMU_TEMP;
}
uint16_t IMU_DecodeIMUData_Angl(uint8_t chrTemp[],float omga[]){
    omga[0] = (chrTemp[3]<<8|chrTemp[2])/32768.0*180;
    omga[1] = (chrTemp[5]<<8|chrTemp[4])/32768.0*180;
    omga[2] = (chrTemp[7]<<8|chrTemp[6])/32768.0*180; 
    return __IMU_TEMP;
}
